repeat
  if isPressed(LEFT) then
     write("Left")
  elseif isPressed(RIGHT) then
     write("Right")
  elseif isPressed(ENTER) then
     write("Enter")
  else
     write("None")
  end
until isPressed(ESCAPE)
write("Program finished")

